package br.academia.dominio;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;

@SuppressWarnings("serial")
@Entity
@Table(name="exercicio", schema="public", uniqueConstraints={@UniqueConstraint(columnNames={"nome"})})
public class Exercicio extends PersistDB{
	@Id
	@Column(name="id_exercicio")
	@SequenceGenerator(allocationSize=1, name = "SEQ_ID_EXERCICIO", sequenceName = "public.seq_id_exercicio")
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQ_ID_EXERCICIO")
	private int id;
	
	@Column(length=256)
	private String nome;
	
	@Column
	private Boolean inativo;
	
	public Exercicio(){
		
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}
	
	public String getNome() {
		return nome;
	}

	public void setNome(String nome) {
		this.nome = nome;
	}

	public Boolean getInativo() {
		return inativo;
	}

	public void setInativo(Boolean inativo) {
		this.inativo = inativo;
	}
}
